package com.tengju.bff.interfaces.shared;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@Data
@ApiModel(value = "PageResultVO", description = "分页查询返回公共对象")
public class PageResultVO implements Serializable {

    /** */
    private static final long serialVersionUID = 1L;
    
    @ApiModelProperty("页大小")
    private Integer pageSize = 10;
    
    @ApiModelProperty("页码")
    private Integer pageIndex = 1;
    
    @ApiModelProperty("记录总条数")
    private Integer total = 0;

    public static PageResultVO of(Integer pageIndex, Integer pageSize, Integer total){
        PageResultVO vo = new PageResultVO();
        vo.setPageIndex(pageIndex);
        vo.setPageSize(pageSize);
        vo.setTotal(total);
        return vo;
    }

}
